<template>
  <div
    class="jy-style-height copyright-box"
    :style="{
      background: ` url(${publicUrls + 'free/style17/publicStyle17Bg.png' + '?imageView2/3/format/webp'})`,
    }"
  >
    <div class="content-box">
      <div class="copyright-heard">
        <img class="backHome" @click="blankHome" :src="publicUrls + 'free/style17/backHome.png'" alt="" />
        <div class="heard-title">
          <p>版权声明</p>
          <img :src="publicUrls + 'free/style17/otherTitleBg.png'" alt="" />
        </div>
      </div>
      <div class="copyright-content">
        <scrollBox
          color="#333"
          v-if="Scrollheights"
          :remarks="commonStore.copyrightInfo"
          :byid="234"
          :height="getScrollWComputed"
        >
          <template #solidBorder>
            <div class="solidBorder-child"></div>
          </template>
        </scrollBox>
      </div>
      <div class="content-door">
        <i class="iconfonts">&#xe6dd;</i>
        <span>永不落幕的展览与展示平台</span>
      </div>
    </div>
    <MenuNavigation />
  </div>
</template>

<script lang="ts">
export default defineComponent({
  name: 'style17',
});
</script>

<script setup lang="ts">
import { publicUrls } from '@/utils/minxin';
import { commonDataStore, useProjectStore } from '@/store';
import { defineComponent, nextTick, ref, computed } from 'vue';
import { useRouter, useRoute } from 'vue-router';
import ScrollBox from '../scrollBox16.vue';
import MenuNavigation from '@/freeComponents/menuNavigation/index.vue';

const commonStore = commonDataStore();
const store = useProjectStore();
const router = useRouter();
const route = useRoute();
const content = ref(null);
const Scrollheights = ref();

let viewportHeight = window.innerHeight;
Scrollheights.value = viewportHeight * 0.4388;
const getScrollWComputed = computed(() => {
  let rootNode = document.documentElement;

  // 获取计算后的样式
  let computedStyle = window.getComputedStyle(rootNode);

  // 读取字体大小（注意这里返回的可能是一个包含单位的字符串，如"16px"）
  let fontSize = computedStyle.fontSize;

  // 如果你需要一个数字值（不带单位）进行计算，你可能需要解析这个字符串
  // 例如，使用正则表达式或split()方法去除单位，并将结果转换为数字
  let fontSizeNumber = parseFloat(fontSize.replace(/[^0-9.-]/g, ''));
  let heights = (fontSizeNumber / 144) * 460;
  return heights;
});
const blankHome = () => {
  store.menuId = null;
  router.push({ name: route.meta.loopType ? 'exhibitionHome' : 'templateedit' });
};
</script>

<style scoped lang="less">
.copyright-box {
  width: 100%;
  padding-bottom: 0px;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
}
// 头部
.content-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 118px;
  position: relative;
  .copyright-heard {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 76px;
    margin-bottom: 24px;

    .heard-title {
      width: 350px;
      height: 67px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      ::v-deep p {
        font-family: SourceHanSerifCN-Bold;
        font-size: 36px;
        color: #fed681;
        line-height: 67px;
        margin: 0 8px;
        position: relative;
        z-index: 1;
      }
      img {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
      }
    }
    .backHome {
      cursor: pointer;
      width: 32px;
      height: 32px;
      position: absolute;
      left: 56px;
      top: 50%;
      transform: translateY(-50%);
    }
  }
}

// 内容
.copyright-content {
  width: calc(100% - 120px);
  max-width: 1200px;
  height: 560px;
  padding: 0 177px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  overflow: hidden;
  background: url(https://static.jiyi.show/free/style17/otherTextBg.png?imageView2/3/format/webp) no-repeat center/100%
    100%;
  // 滚动条位置
  ::v-deep .solid-box-parent {
    right: -30px;
  }
  // 滚动条轨道
  .solidBorder-child {
    width: 4px;
    height: 100%;
    background: rgba(254, 214, 129, 0.3);
    border-radius: 2px;
  }
  ::v-deep .scrollBar {
    border-radius: 3px;
    background: #ffe3a2;
  }
  // 滚动条按钮
  ::v-deep .templatestyle1-scroll-box-tumb {
    display: flex;
    justify-content: center;
    height: 16px !important;
    // top: -4px;
    .shadow-box {
      width: 24px !important;
      height: 16px !important;
    }
  }
  // 文本样式
  ::v-deep .unit-exbi-remarks-info-remarks {
    p {
      color: #fed681;
      font-size: 16px;
      text-align: justify;
      font-weight: normal;
    }
  }
}

// 底部logo
.content-door {
  width: 100%;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 8px;
  background: rgba(70, 23, 7, 0.5);
  .iconfonts {
    font-size: 26px;
    background: linear-gradient(270deg, #e7a859 0%, #ffdaac 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 32px;
  }
  span {
    font-family: PingFang SC;
    font-size: 16px;
    line-height: 32px;
    background: linear-gradient(270deg, #e7a859 0%, #ffdaac 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-left: 20px;
  }
}
</style>